package com.ytjj.qmyx.mall.service.impl;

import com.github.pagehelper.PageHelper;
import com.ytjj.common.utils.TokenUtil;
import com.ytjj.qmyx.mall.mapper.ProductForumDao;
import com.ytjj.qmyx.mall.model.response.GoodsProductResponse;
import com.ytjj.qmyx.mall.service.ProductForumService;
import org.springframework.stereotype.Service;

import javax.annotation.Resource;
import java.util.List;

/**
 *
 *  *
 **/
@Service
public class ProductForumServiceImpl implements ProductForumService {

    @Resource
    private ProductForumDao productForumDao;

    @Override
    public List<GoodsProductResponse> getProducts(Integer pageNum, Integer pageSize, String type) {
        PageHelper.startPage(pageNum,pageSize);
        return productForumDao.queryProduct(type, TokenUtil.getPlatformData());
    }
}
